<% content_for :left_sidebar do  %>
  <%= render :partial => "layouts/sidebar/xiwenguanli" %>
<% end %>
<div class="page-header">
  <h1>新闻线索详情</h1>
</div>

<dl class="dl-horizontal">
  <dt><strong>推送单位:</strong></dt>
  <dd><%= @clue.contribution_units %></dd>
  <dt><strong>联系人:</strong></dt>
  <dd><%= @clue.linkman %></dd>
  <dt><strong>联系电话:</strong></dt>
  <dd><%= @clue.phone %></dd>
  <dt><strong>线索内容:</strong></dt>
  <dd><%=raw @clue.content %></dd>
  <dt><strong>审核状态:</strong></dt>
  <dd><%= @clue.check_text %></dd>
  <% if @clue.check == 3 %>
      <dt><strong>未采用原因:</strong></dt>
      <dd><%= @clue.reason %></dd>
  <% end %>
  <dd>
    <%= form_tag reject_admins_clue_path do %>
        <% if @clue.check == 0 %>
            <%= link_to '确认送审',submit_admins_clue_path(@clue),:class => 'btn btn-primary' %>
        <% end %>
        <%= link_to '返回',admins_clues_path,:class => 'btn btn-info' %>
        <% if Clue.can_approve?(@clue,current_user) %>
            <%= link_to '确认采用',approve_admins_clue_path(@clue),:class => 'btn btn-primary btn-success' %>
            <%= hidden_field_tag :id,@clue.id %>
            <%= submit_tag '确认不采用',:class => 'btn btn-primary btn-danger' %>
            <div style="margin-top: 5px;">
              <%= must_label %>如果不采用,请填写不采用原因:
              <%= text_field_tag :reason,'',required: "required" %>
            </div>
        <% end %>
    <% end %>
  </dd>
</dl>

